/*
 *  Copyright (c) 2010 Brian Stanek <bstanek@gmail.com>
 *
 *  Permission is hereby granted, free of charge, to any person
 *  obtaining a copy of this software and associated documentation
 *  files (the "Software"), to deal in the Software without
 *  restriction, including without limitation the rights to use,
 *  copy, modify, merge, publish, distribute, sublicense, and/or sell
 *  copies of the Software, and to permit persons to whom the
 *  Software is furnished to do so, subject to the following
 *  conditions:
 *
 *  The above copyright notice and this permission notice shall be
 *  included in all copies or substantial portions of the Software.
 *
 *  THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
 *  EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
 *  OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
 *  NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
 *  HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
 *  WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
 *  FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
 *  OTHER DEALINGS IN THE SOFTWARE.
 */

package guice
{

/**
 *  The stage we're running in.
 */
public class Stage
{

    //--------------------------------------------------------------------------
    //
    //  Class Constants
    //
    //--------------------------------------------------------------------------

    /**
     * We're running in a tool (an IDE plugin for example). We need binding
     * meta data but not a functioning Injector. Do not inject members of
     * instances. Do not load eager singletons. Do as little as possible so
     * our tools run nice and snappy. Injectors created in this stage cannot
     * be used to satisfy injections.
     */
    public static const TOOL:Stage = new Stage("tool");

    /**
     * We want fast startup times at the expense of runtime performance and
     * some up front error checking.
     */
    public static const DEVELOPMENT:Stage = new Stage("development");

    /**
     * We want to catch errors as early as possible and take performance
     * hits up front.
     */
    public static const PRODUCTION:Stage = new Stage("production");

    //--------------------------------------------------------------------------
    //
    //  Constructor
    //
    //--------------------------------------------------------------------------

    public function Stage(name:String)
    {
        super();
        this.name = name;
    }

    //--------------------------------------------------------------------------
    //
    //  Variables
    //
    //--------------------------------------------------------------------------

    /**
     *  @private
     *  Name of the stage we're running in.
     */
    private var name:String;

}

}
